#ifndef CYL_H
#define CYL_H

//Mac OS 10.5 OpenGL Libraries
//#include <GLUT/glut.h>

#include <cstdlib>
#include <iostream>

//Windows/Linux OpenGL Libraries
#include <GL/glut.h>
#include "../shapeNode.h"
#include "math.h"
//ImageMagick Headers
#include <Magick++.h>

/**
 * Cylinder shape class
 *
 * Cylinder is oriented along the major axis with the 
 * origin in the middle of its height
 */
using namespace scenegraph;

namespace shapes{

class Cylinder : public ShapeNode 
{
	float radius;
	float height;
	float axis[3];
	float alignAngle;
	GLUquadricObj *quadric;
	// Number of texture objects
	int textureCount;
	// Current texture object ID
	GLint currentTexture;
	// Texture objects		
	static GLuint textureObjects[1];
	bool closed;

public:
	bool textured;

	Cylinder();
	Cylinder(float setRadius, float setHeight, int RGBAvalues);
	Cylinder( Cylinder& cylinder );
	~Cylinder();
	Cylinder& operator=( Cylinder& cylinder );
	inline void setRadius( float radius );
	inline void setClosed( bool closed );
	inline void setHeight( float height );
	void setMajorAxis( Vector3D axis );
	void draw();
	void setTexture(char *fileName);
};

void Cylinder::setRadius( float radius ) {
  radius = radius;
}

void Cylinder::setClosed( bool closed ) {
  closed = closed;
}

void Cylinder::setHeight( float height ) {
  height = height;
}
}

#endif
